import Mock from 'mockjs2'
import {
	builder,
	getBody
} from '../util'
const username = ['admin']
const password = ['123456']
export default {
	// 登录
	'post|/passport/login': res => {
		const body = getBody(res)
		if (username.includes(body.userName) && password.includes(body.password)) {
			return builder({
				token: Mock.mock('@guid')
			}, '', true)

		}
		return builder({
			isLogin: true
		}, '账户或密码错误', false)
	}
}
